﻿<phone:PhoneApplicationPage
    x:Class="FeatureOverview.Features.Controls.PanoramaControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="itemTemplate">
			<Grid Width="380">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="118"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<TextBlock Text="{Binding title}" Margin="8,8,8,0" VerticalAlignment="Top" Grid.Column="1" TextWrapping="Wrap"/>
				<Image Source="{Binding enclosure.url}" Margin="8"/>
			</Grid>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" DataContext="{Binding Source={StaticResource MsnSportSampleData}}">
        
        <controls:Panorama
            Name="panorama1"
            Title="panorama">
            <controls:Panorama.Background>
                <ImageBrush
                    ImageSource="/FeatureOverview;component/Assets/panorama.jpg" />
            </controls:Panorama.Background>
            <controls:PanoramaItem
                Header="MSN Sport">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                        Name="_list"
                        SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem
                Header="MSN Top News">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                		x:Name="_list_Copy"
                		SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem
                Header="item3">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                		x:Name="_list_Copy1"
                		SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem
                Header="item4">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                		x:Name="_list_Copy2"
                		SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem
                Header="item5">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                		x:Name="_list_Copy3"
                		SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem
                Header="item6">
                <Grid >
                	<ListBox ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding channel.itemCollection}"
                		x:Name="_list_Copy4"
                		SelectionChanged="_list_SelectionChanged" />
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

</phone:PhoneApplicationPage>
